<?php

	header('Content-Type: text/html; charset=utf-8');

	require_once(dirname(__FILE__)."/../core/safeParam.php");
	require_once(dirname(__FILE__).'/../core/database.php');
	require_once(dirname(__FILE__).'/../core/functions.php');


	if (!ini_get('register_globals')) {
		$superglobals = array($_SERVER, $_ENV, $_FILES,$_SESSION,$_POST,$_GET);
  		
  		if (isset($_SESSION)) {
  			array_unshift($superglobals, $_SESSION);
  		}
  		
  		foreach ($superglobals as $superglobal) {
  			extract($superglobal, EXTR_SKIP);
  		} 
  		
  		ini_set('register_globals', true);
	} 
	
	if (isset($_SESSION['password'])) {
		//define a restaurant
		if (isset($_GET['site']) && $_GET['site'] != '') {
			$_SESSION['arid'] = $_GET['site'];
		}
		
		if (! isset($_SESSION['arid']) or $_SESSION['arid'] == '') {
			if (isset($_SESSION['admin'])){
				$_SESSION['arid'] = $_SESSION['admin'];
			} else {
				$_SESSION['arid'] = 1;
			}
		} else { 
			define("ARID", $_SESSION['arid']);
  			
  			$config = $database->select("SELECT * FROM config where id = " . ARID . "");
  			$query = $database->query("SELECT * FROM config WHERE id =" . ARID . "");
  
  			while ($list = mysql_fetch_array($query)) {
    			$home = $list['home'];
  			} 

  			$staffUsers = getUserAuthorizationsInRestaurant();
  			$username = $_SESSION['username'];
  			
  			if (array_key_exists( $username, $staffUsers)) {
    			$user = $staffUsers[$username];
			} 
						  			
  			$displayClass = "";
  
  			function getActivityAuthorizations($user){
  				$activities = array();
  				$activities['menu'] = "";
   			$activities['homePage'] = "";
   			$activities['siteDocuments'] = "";
   			$activities['restaurant'] = "";
   			$activities['gateways'] = "";
   			$activities['users'] = "";
   			$activities['coupons'] = "";
   			$activities['orders'] = "";
   			$activities['orderstatus'] = "";
   			$activities['locations'] = "";
   			$activities['reports'] = "";
   			$activities['ads'] = "";
   			$activities['news'] = "";
   			$activities['import'] = "";
   			$activities['tools'] = "";
   			$activities['plugins'] = "";
		   
		   	if (isset($user)) {
		   		foreach ($activities as $key=>$value){
		   			if (array_key_exists($key, $user)){
		   				if ( $user['authorized'][$key] == "checked" ){
		   					$activities[$key] = "";
		   				} else {
		   					$activities[$key] = "hidden";
		   				}
						} 
    				}
    			}
    		
    			return $activities;
    		}
			
			$activities = array();
			if(isset($user)){
				$activities = getActivityAuthorizations($user);
			}

		}
	} 
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Delivery351 - Administracion del Local -</title>
	<style type="text/css"></style>

	<!--// FOLLOWING SCRIPT IS FOR PNG FIX IE5.5/IE6-->
	<!--[if lt IE 7]>
		<script defer type="text/javascript" src="js/pngfix.js"></script> 
	<![endif]--> 

	<link href="../lib/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
	<link href="../lib/jqueryui/css/flick/jquery-ui-1.8.21.custom.css" rel="stylesheet" type="text/css" />
	<link href="../lib/jquerytimepicker/jquery.ui.timepicker.css" rel="stylesheet" type="text/css" />
	<link href="css/styles.css" rel="stylesheet" type="text/css" />
	<link rel="icon" type="image/png" href="/favicon.png">
	
	<script type="text/javascript" src="../lib/jquery/jquery.1.7.2.min.js"></script>
	<script type="text/javascript" src="../lib/jqueryui/js/jquery-ui-1.8.21.custom.min.js"></script>
	<script type="text/javascript" src="../lib/jquerytimepicker/jquery.ui.timepicker.js"></script>
	<script type="text/javascript" src="js/dropmenu.js"></script>
	<script type="text/javascript" src="js/site.js"></script>
</head>

<body>
<div id="contenedor">
	<div id="top">
		<!--// SI ALGUIEN SE LOGUEO SE MUESTRA MENU SUPERIOR DE CONFIGURACION-->
		<?php
			if (isset($_SESSION['password'])) {
		?>
			
			<!--// CERRAR SESION-->
			<div id="logout">
				<div align="center">
   				<div id="logout_icon">
   					<a href="../functions/logout.php">
   						<img src="images/icons/big_logout.png" alt="big_logout" width="30" height="30" border="0" />
   					</a>
   				</div>
   		
   				<br />
					<br />			

					<div id="logout_text">
						<a href="../functions/logout.php"><span class="toplinks">Cerrar Sesión</span></a>
					</div>
				</div>
			</div>

			<!--// CONFIGURACION-->
			<div id="settings">
				<div align="center">
      			<div id="settings_icon">
						<a href="index.php?edit=config">
							<img src="images/icons/big_settings.png" alt="big_settings" width="30" height="30" border="0" />
						</a>
					</div>
			
					<br />
        			<br />
      				
      			<div id="settings_text">
						<a href="index.php?edit=config">Configuración</a>
      			</div>
      		</div>	
      	</div>

				
			<!--// VER PAGINA-->
			<div id="visitsite">
				<div align="center">
					<div id="visitsite_icon">
						<a href="../sites.php?site=<?php echo $_SESSION['arid'] ?>" target="_blank">
							<img src="images/icons/big_visitsite.png" alt="big_visitsite" width="30" height="30" border="0" />
						</a>
					</div>

					<br />
					<br />

					<div id="visitsite_text">
						<a href="../sites.php?site=<?php echo $_SESSION['arid'] ?>" target="_blank">Ver página</a>
					</div>			
      		</div>
   		</div>
   			
   		<!--// BIENVENIDO-->
   		<div id="hello">
				<div align="center">
					<b>Bienvenido</b> <?php echo $_SESSION['username']?> 
					
					<br />
					<br />
					
					<!--// SELECTOR DE SITIOS-->
					<?php
						if (isset($_SESSION['password']) && $_SESSION['admin'] == 1 && (! isset($_SESSION['staffUser'])) ) {
					?>
						<form name="jump1">
							<select name="myjumpbox" id="myjumpbox" OnChange="location.href=jump1.myjumpbox.options[selectedIndex].value" >
								<?php
									$sites = $database->select("SELECT * from config order by sitename");
									for ($s=0; $s< count($sites); $s++) {
										if (ARID == $sites[$s]['id']) {
											$selected[$s] = "selected=selcted";
										}
										
										echo '<option value="index.php?site=' . $sites[$s]['id'] . '"  name="jumpurl2" ' . $selected[$s] . '>' . $sites[$s]['sitename'] . '</option>';
									}	 
								?>
							</select>
						</form>	
					<?php
						} 
					?>
				</div>
			</div>
					
			<!--// LOGO-->
			<div id="logo">
				<div align="center">
					<img src="../UserFiles/Image/product_photos/<?php echo $config[0]['logo']; ?>" class="logo" />
				</div>
			</div>
				
		<?php
			}//if isset(password) 
		?>
		</div><!--// FIN TOP -->
	
		<table id="contenedora" cellpadding="5px">
			<tr>
				<th id="celdaizquierda" >
					<!--// MENU IZQUIERDO-->
					<div id="menuizquierdo" align="center">		
						<div id="leftcolumn">
							<div id="navigation">
	  							<div id="navigationtitle">  			
  									<?php  										
										if (isset($_SESSION['password'])) {
								
											function renderMenuItem($cssClass, $authorizationKey, $menuAction, $text){
												return '<a class="'.$cssClass.' '.$authorizationKey.'" href="index.php?edit='.$menuAction.'">'.$text.'</a>';
      	  								}
      	  								
      	  								$cant_pedidos = 0;
      	  									
      	  								if($_SESSION['arid'] != 1 ) {
      	  									$results = $database->select("SELECT * FROM order_sum WHERE rid = ".ARID." ORDER by date desc ");
												
												if($results != false){
													for($i=0; $i< count($results); $i++){
														if($results[$i]['status'] == 0) {
															$cant_pedidos++;
														}
													}  
												}
      	  								}
																							      	  		
      	  								$menu = '<div id="mainMenu"> <br />';
          								$menu .= renderMenuItem("menu", "menu", "menu", "Menú");
          								$menu .= renderMenuItem("global_menu_options", "menu", "global-options", "Opciones Globales");
          								$menu .= renderMenuItem("home_page", "homePage", "home", "Página Principal");
		         						$menu .= renderMenuItem("site_documents", "siteDocuments", "pages", "Páginas del Sitio");
          								$menu .= renderMenuItem("config", "restaurant", "config", "Configuración Principal");
          								$menu .= renderMenuItem("gateways", "gateways", "gateway", "Formas de Pago");
          								$menu .= renderMenuItem("users", "users", "users", "Usuarios");
											
											if($cant_pedidos == 0){
												$menu .= renderMenuItem("orders", "orders", "orders", "Pedidos");
											} else{
												$menu .= renderMenuItem("orders", "orders", "orders", 
												"Pedidos &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
												<span style='background-color:#D33; border-radius:8px; color:#FFF; font-weight:bold;'>
													 &nbsp;&nbsp;". $cant_pedidos ."&nbsp;&nbsp; 
												</span>");
											}								 
          								
         								$menu .= renderMenuItem("order_status", "orderstatus", "order_status", "Estado de los Pedidos");
          								$menu .= renderMenuItem("locations", "locations", "locations", "Ubicación");
          								$menu .= renderMenuItem("reports", "reports", "reports", "Reportes");
          								$menu .= renderMenuItem("ad_manager", "ads", "ads", "Agregar Banner");
          								$menu .= renderMenuItem("import", "import", "import", "Importar");
          								$menu .= renderMenuItem("news", "news", "news", "Noticias");
         								$menu .= renderMenuItem("tools", "tools", "tools", "Tools");
          								$menu .= renderMenuItem("plugins", "plugins", "plugins", "Plugins");
          								$menu .= "<br/></div>";
											echo $menu;
        								}
									?>
    							</div>
							</div><!--// FIN NAVIGATION-->
						</div><!--// FIN LEFTCOLUMN-->
					</div><!--// FIN MENU IZQUIERDO-->
				</th>
			
			
				<!--// AVISO DE ACCIONES DE CAMBIOS-->
				<?php
					$message = "";
					$errorClass = "";

					if (isset($_GET['updated']) && $_GET['updated'] == 1) {
						$message = "Los cambios han sido guardados";
					} else {
						if (isset($_SESSION['error'])){
							$message = $_SESSION['error'];
    						unset($_SESSION['error']);
    						$errorClass = "errorMessage";
    					}
					}
				
					if ($message){
				?>
			
					<script type="text/javascript">
						$(document).ready(function(){	
							$("#object").animate({top: "90px"}, 2000 ).fadeOut(100).fadeIn(100).fadeOut(100).fadeIn(100);
      					$("#close_message").click(function(){$("#object").fadeOut("slow");});      
      					$("#object").fadeOut("slow");
   					});
					</script>

					<!--// DIV DE AVISO DE ACCIONES -->
					<div id="object" class="message ">
						<strong><?php echo $message;?></strong>
					</div>
				
				<?php
					} //if(message) 
				?>

				<!--// CELDA DERECHA -->			
				<th id="celdaderecha">
					
					<!--// CONTENIDO-->
					<div id="contenido" align="center">
						<div id="content"> 
							<?php
								if (!isset($_SESSION['password'])) {
									if (isset($error)) {
										echo '<h3 align="center" class="error">Error: usuario y/o contraseña</h3><br />';
  									} 
							?>    		  	
    		  				
    		  				<!--// INICIO DE SESION -->
 							<div id="startsession" align="center"> 								
  								<div id="sessiontitle">
  									<h2>Iniciar Sesión </h2>
  								</div>
      						
      						<div id="sessionformulario">
      							<form method="post" action="../functions/login.php">
										<div id="session_user">
											<label for="user">Usuario:<label>
    										<input id="username" name="username" />
      								</div>	
      								
      								<div id="session_password">
											<label for="password">Contraseña:</label>
    										<input id="password" name="password" type="password" />
      								</div>
      								
      								<div id="session_forgot">
	      								<a href="../functions/pages.php?function=reset-password">¿Olvidaste tu contraseña?</a>
      								</div>
      								
      								<div id="session_button">
	      								<input type="submit" value="Entrar"/>
      								</div>
									</form>
      						</div>
    						</div>
							
							<?php
								} else {
									echo '
										<table width="800" border=1 cellpadding="5px">
											<tr>
												<td bgcolor="#FDFDFD">
													<p class="bodytext_paragraph">';
													// user logged in, either show the default page, or process the activity the user has chosen.
													switch ($edit) {
														default:
															if ( (isset($_GET['mid'])) && ($_GET['mid'] == '') ) {
																if ($activities['menu'] != "hidden"){
																	require_once "menu.php";
       														} else {
	       														echo '<p>Seleccione una accion del menu</p>'; 
       														}
      													} else {
      														if(isset($_GET['mid'])) {
      															$menuid = $_GET['mid'];
      														}
      							
      														switch ($menu) {
      															default:
      																include 'menu.php';
            													break;
          								
          														case "add-cat":
							?>
         															<!--// AGREGAR CATEGORÍA -->
         															<h2>Categoria</h2>
         															<form action="../functions/menus.php?function=add-category" method="post">
																			<input type="hidden" name="rid" value="<?php echo ARID; ?>" />
        																	<table width="85%" border="0" cellspacing="0" cellpadding="0">
          																	<tr>	
          																		<td>
          																			Nombre de la categoria
          																		</td>
          																		
          																		<td>
          																			<input type="text" name="name" >
     																					<input type="hidden" name="mid" value="<?php echo $menuid; ?>" >
     																					<input type="hidden" name="mid" value="<?php echo $_GET['mid']; ?>" />
                     															<input type="submit" name="submit" value="add Category" style="border:outset 2px #CCCCCC">
                  															</td>
              																</tr>
         																</table>
        																</form>
        					<?php
        															break;
					
																	case "add":
            													$catid = $_GET['catid'];
							?>
        																<!--// MENU-->
        																<h2>Menu Item</h2>
        																<?php
        																	if (isset($_GET['added'])) {
        																		echo '
        																		<p style="color:green; font-size:.9em">
        																			<img src="accept.png" border="0"> Item added, you may add another item below or <a href="index.php">click here</a> to go back to the menu
        																		</p>';
            															} 
		  																?>
		  																
		  																<form action="../functions/menus.php?function=add-item" method="post"> 
		  																	<input type="hidden" name="rid" value="<?php echo ARID; ?>" />
		  																	<table width="85%" border="0" cellspacing="0" cellpadding="0">
		  																	<tr>
          																	<td>
          																		Codigo del producto
          																	</td>
          																	
          																	<td>
          																		<input type="text" name="code"  >
          																	</td>
          																</tr>
          
          																<tr>
          																	<td>
          																		Nombre del item
          																	</td>
          																	
          																	<td>
          																		<input type="text" name="name" >
  																					<input type="hidden" name="mid" value="<?php echo $_GET['mid']; ?>" >
          																		<input type="hidden" name="cat" value="<?php echo $catid; ?>"> 
          																	</td>
          																</tr>
            
            															<tr>
          																	<td>
          																		Tipo
          																	</td>
          																	
          																	<td>
          																		<input type="text" name="type1">
          																	</td>
          																</tr>
                                   
           																<tr>
          																	<td>
          																		Precio
          																	</td>
          																	
          																	<td>
          																		<input type="text" name="price">
          																	</td>
          																</tr>
            
            															<tr>
          																	<td colspan="2"> 
          																		Descripcion:
          																		<div align="center">
            																		<textarea name="description" cols="45" rows="10"></textarea>
            																	</div>
            																</td>
          																</tr>
          
          																<tr>
          																	<td colspan="2">
          																		<input type="submit" name="submit" value="Guardar">
          																	</td>
          																</tr>
         															</table>
        															</form>

							<?php
         													break;
         	
          													//Edit the name of the menu
          													case "edit":
            													$menuid = $_GET['menuid'];
            													$query  = $database->query("SELECT * FROM menu WHERE id = '$menuid' ORDER by name ");
            				
            													while ($list = mysql_fetch_array($query)) {
              														$name = $list['name'];
              														$type = $list['type'];
            													}
            			?>
																	
																	<h2>Menu</h2>
																	<form action="../functions/menus.php?function=edit-menu" method="post">
     																	<input type="hidden" name="rid" value="<?php echo ARID; ?>" />
    																	<table width="85%" border="0" cellspacing="0" cellpadding="0" id="menupage">
  																			<tr>
    																			<td>
    																				Nombre
    																			</td>
    																			
    																			<td>
    																				<input type="text" name="name" value="<?php echo $name; ?>" >
    																				<input type="hidden" name="id" value="<?php echo $menuid; ?>" >
  																				</td>
  																			</tr>
 																			
 																			<tr>
   																			<td colspan="2">
    																				<input type="submit" name="submit" value="Guardar">
    																			</td>
   																		</tr>
																		</table>
																	</form>
							<?php
																	$category = $_GET['category'];	            				
            													switch ($category) {
            														##default list menus##
              														default:
              															$query = $database->query("SELECT * FROM menu_cat WHERE menu = '$menuid' AND rid = " . ARID . "");
              															
              															while ($list = mysql_fetch_array($query)) {
              																$catid       = $list['id'];
                  														$name        = $list['name'];
                  														$menuid      = $list['mid'];
                  														$description = $list['description'];
                  														$row_color   = ($row_count % 2) ? $color1 : $color2;
                  														
                  														$categories .= 
                  														'<tr>
                  															<td>
                  																<a href="index.php?page=menus&menu=edit&category=edit&mid=' . $menuid . '&catid=' . $catid . '">&bull; ' . $name . '</a>
                  															</td>
                  
                  															<td>
                  																' . $description . '
                  															</td>
                  

                  														</tr>';
                                    								$row_count++;
                														}
							?>
																			<!--// CATEGORÍA -->        																	
        																	<h2>Categoria</h2>
        																	<a href="index.php?page=menus&menu=edit&menuid=<?php echo $menuid;?> &category=add">
        																		Agregar categoria
        																	</a>
           
       																	<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="style2">
       																		<tr>
         																		<td width="33%">
         																			<strong>Nombre de la categoria </strong>
         																		</td>
         																		
            																	<td width="33%">
            																		<strong>Tipo </strong>
            																	</td>
            																	
            																	<td width="33%">
            																		<strong>Opciones </strong>
            																	</td>
        																		</tr>                    
     																		</table> 
      					<?php
      																break; 
							?>

      					<?php
         		         									//Edit the name of the menu
         														case "edit":
         															$query = $database->query("SELECT * FROM menu_cat WHERE id = '$catid' ");
            														while ($list = mysql_fetch_array($query)) {
            															$catid       = $list['id'];
               														$catname     = $list['name'];
               														$menuid      = $list['mid'];
               														$description = $list['description'];
            														} 
							?>
      																
      																<h2>Categoria</h2>
      																<form action="../functions/menus.php?function=edit-category" method="post">
																			<input type="hidden" name="rid" value="<?php echo ARID; ?>" />
         																<table width="85%" border="0" cellspacing="0" cellpadding="0"  id="cat">
         																	<tr>
          																		<td>
          																			Nombre de la categoria
          																		</td>
          																		
          																		<td>
          																			<input type="text" name="name" value="<?php echo $catname; ?>" >
            																		<input type="hidden" name="catid" value="<?php echo $catid; ?>" >
            																		<input type="hidden" name="mid" value="<?php echo $menuid; ?>" >
            																	</td>
          																	</tr>
        		
        																		<tr>
          																		<td colspan="2">
          																			<input type="submit" name="submit" value="Guardar Categoría">
          																		</td>
          																	</tr>
        																	</table>
      																</form>
							<?php
																	break;

            												} //$category
         											
        												} //$menu
      											}
      										      	
    											case "home":
							?>
													<!--// PÁGINA PRINCIPAL -->
													<div style="margin-left:20px;">
														<h2>Página Principal</h2>
													</div>
			
													<br />
													<br />
			
													<div align="center">
														<form method="post" action="../functions/menus.php?function=edit-home">
														<input type="hidden" value="<?php echo $_SESSION['arid']; ?>" name="id" />
					
														<script type="text/javascript" src="tinymce/tiny_mce.js"></script>					
														<script type="text/javascript">
															tinyMCE.init({
																// General options
        														mode : "textareas",
        														theme : "advanced",
        														plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

        														// Theme options
        														theme_advanced_buttons1	: "template, |",
        														theme_advanced_buttons2 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
        														theme_advanced_buttons3 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
        														theme_advanced_buttons4 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
        														theme_advanced_buttons5 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
        														theme_advanced_toolbar_location : "top",
        														theme_advanced_toolbar_align : "left",
        														theme_advanced_statusbar_location : "bottom",
        														theme_advanced_resizing : true,
        					
        														// Skin options
        														skin : "o2k7",
        														skin_variant : "silver",
		        			
        														// Example content CSS (should be your site CSS)
        														content_css : "css/example.css",
			
	        													// Lists for link/image/media/template dialogs
        														template_external_list_url : "tinymce/template_list.js",
        														external_link_list_url : "js/link_list.js",
        														external_image_list_url : "js/image_list.js",
        														media_external_list_url : "js/media_list.js",
	
	        													// Replace values for the template plugin
        														template_replace_values : {
	        														username : "Agún usuario",
        															staffid : "01"
        														}
															});
														</script>  
									
        												<textarea name="home" cols="35" rows="30">
															<?php
      														echo $home;
															?>        			
        												</textarea>
        			
        												<br />
        			
        												<input type="submit" value="Actualizar Página" style="padding:5px;">
													</form>
												</div>
							<?php
											break;
    
    										case "pages":
      										include 'pages.php';
      									break;
    
    										case "users":
      										include 'users.php';
      									break;
    
    										case "gateway":
      										include 'gateway.php';
      									break;
    
    										case "menu":
      										include 'menu.php';
      									break;
    
    										case "orders":
      										if ($config[0]['reg'] == 1) {
        											include 'ordersreg.php';
      										} else {
        											include 'orders.php';
      										}
      									break;
    
    										case "locations":
      										include 'locations.php';
      									break;
    
	    									case "coupons":
      										include 'coupons.php';
      									break;
    
    										case "config":
      										include 'config.php';
      									break;
    
    										case "reports":
      										include 'reports.php';
      									break;
    
    										case "reports":
      										include 'reports.php';
      									break;
    
    										case "ads":
      										include 'ads.php';
      									break;
    
    										case "global-options":
      										include 'global-options.php';
      									break;
    
    										case "import":
      										include 'import.php';
      									break;
    
    										case "news":
      										include 'news.php';
      									break;
    
    										case "order_status":
      										include 'order_status.php';
      									break;
    
    										case "pizza-feasts":
      										include 'pizza-feasts.php';
      									break;
    		
    										case "specials":
      										include 'specials.php';
      									break;

		   								case "tools":
      										include 'tools.php';
      									break;
    
    										case "plugins":
      										include 'plugins.php';
		      							break;
  										} //$edit
									}
							?>
												</td>
   										</tr>
										</table>
									</div><!--// FIN CONTENT-->
								</div><!--// FIN CONTENIDO-->
							</th>
						</tr>
					</table>
				</div>
</body>

</html>